/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const systemRouter = {
  path: '/system',
  component: Layout,
  redirect: 'noRedirect',
  name: 'System',
  meta: {
    title: 'Setting',
    icon: 'setting'
  },
  children: [
    {
      path: 'dictionary',
      component: () => import('@/views/system/dictionary/list'), // Parent router-view
      name: 'Dictionary',
      meta: { title: 'Dictionary', icon: 'dictionary' }
      // redirect: '/system/dictionary/list'
      // children: [
      //   {
      //     path: 'list',
      //     component: () => import('@/views/system/dictionary/list'),
      //     name: 'Dictionaries',
      //     meta: { title: 'Dictionaries', icon: 'list', noCache: true }
      //   }
      // ]
    },
    {
      path: 'dictionary/create',
      component: () => import('@/views/system/dictionary/create'),
      name: 'CreateDictionary',
      meta: { title: 'Create Dictionary', icon: 'edit' },
      hidden: true
    },
    {
      path: 'dictionary/edit/:id',
      component: () => import('@/views/system/dictionary/edit'),
      name: 'EditDictionary',
      meta: {
        title: 'Edit Dictionary',
        activeMenu: '/system/dictionary/list'
      },
      hidden: true
    },
    {
      path: 'icon',
      component: () => import('@/views/system/icons/index'),
      name: 'Icons',
      meta: { title: 'Icons', icon: 'icon' }
    }
  ]
}

export default systemRouter
